import { legacy_createStore as createStore, combineReducers } from 'redux';
// 导入多个 reducer
import { counter } from './reducers/counter';
import { xxx } from './reducers/xxx';

// 合并多个reducer
const rootReducer = combineReducers({ counter, xxx });
// 小注意点 combineReducers 返回的是一个函数
// console.log(typeof rootReducer);

// 创建 store
export const store = createStore(rootReducer);
